package com.cn.design.factory.ioc;

/**
 * @author xuhui
 * @Description:
 * @date 2022-06-29 18:33
 **/
public class PhoneFactory {
    public static Phone getInstance(String ClassName){
        Phone phone = null;
        try{
            phone=(Phone)Class.forName(ClassName).newInstance();
        }catch (Exception e) {
            e.printStackTrace();
        }
        return phone;
    }

}
